#!/bin/bash

ENV="pre"
APP_DIR=("/app/zy-services/zy-product")
JAVA_OPT="-Xms512M -Xmx512M"
for var in ${APP_DIR[@]}
do
   echo "服务文件夹路径："$var
   cd $var || echo "no directory $var."
   nohup java $JAVA_OPT -jar `ls | grep jar` --spring.profiles.active=$ENV --spring.cloud.config.profile=$ENV > /dev/null 2>&1 &
   echo $! > tpid
done
